import React from "react";
import { App } from "antd";

const MyPage = () => {
  const { message, notification, modal } = App.useApp();
  message.success("Good!");
  notification.info({ message: "Good" });
  modal.warning({ title: "Good" });
  // ....
  // other message, notification, modal static function
  return <div>Hello word</div>;
};

const MyApp = () => (
  <App>
    <MyPage />
  </App>
);

export default MyApp;
